<template>
	<view>
		<swiper indicator-dots :circular="true" interval="3000" :autoplay="true">
			<swiper-item v-for="item in list">
				<image :src="'http://124.93.196.45:10001'+item" style="width: 100%; height: 100%;"></image>
			</swiper-item>
		</swiper>
		<view class="p1">
			<text>地址：{{detail.address}}</text>
			<text>联系电话：{{detail.phone}}</text>
			<text>办理入住时间段：{{detail.workTime}}</text>
			<text>剩余男床位数：{{detail.bedsCountBoy}}</text>
			<text>剩余女床位数：{{detail.bedsCountGirl}}</text>
		</view>
		<u-line></u-line>
		<view class="p2">
			<text>驿站简介：{{detail.introduce}}</text>
			<text>房间配置：{{detail.internalFacilities}}</text>
			<text>周边配置：{{detail.surroundingFacilities}}</text>
			<text>特色服务：{{detail.specialService}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail:{},
				id:0,
				list:[],
			}
		},
		onLoad(options) {
			this.id=options.id
			this.getdetail()
		},
		methods: {
			getdetail(){
				this.api.get('/prod-api/api/youth-inn/youth-inn/'+this.id).then(res=>{
					this.detail=res.data.data
					this.list=this.detail.imageUrlList
					uni.setNavigationBarTitle({
						title:res.data.data.name
					})
					// console.log(this.list)
				})
			}
		}
	}
</script>

<style lang="scss">
.p1{
	display: flex;
	flex-direction: column;
	text-align: center;
}
.p2{
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	line-height: 28px;
}
</style>
